<template>
  <svg class="icon-icon" aria-hidden="true">
    <use :xlink:href="_name" />
  </svg>
</template>

<script>
export default {
  name: 'Icon',
  props: {
    name: {
      type: String,
      required: true
    }
  },
  computed: {
    _name () {
      return `#icon-${this.name}`
    }
  }
}
</script>

<style scoped>
.icon-icon {
  width: 1em;
  height: 1em;
  overflow: hidden;
  color: inherit;
  vertical-align: middle;
  fill: currentColor;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
}
</style>
